<?php
namespace App\Query;

use App\Model\Images;

class ImagesQuery extends \HyperfStore\Query
{
    // 构建模型
    protected static function build()
    {
        return Images::orderBy('sort', 'asc');
    }
    
    // 按关键字查找
    public static function keyword($key)
    {
        return static::model()->where('keyword', $key);
    }
}